/**
 * summarize the total.
 * @param s The control parameter string..
 * @return The days between start date and ends.;
 */
function sum(s){
  var fields = s.split(",");
  var total = 0;

  if ((fields!=null) && (fields.length>0)){
	for (var i=0;i<fields.length;++i){
	  if ((document.all(fields[i])!=null) && (document.all(fields[i]).value!='')){
		  total = total + parseFloat(document.all(fields[i]).value);
	  }
	}
  }
  return total;
}